home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Newton Sample Code 1.2 / System Data / Notarize-2 / README.Notarize < prev   
Encoding:
Text File  |  1994-02-28  |  1.9 KB  |  74 lines  |  [TEXT/R*ch]

  1. Notarize, by Maurice Sharp
  2. Copyright (c) 1993, 1994 Apple Computer, Inc.  All rights reserved.
  3.  
  4. Special thanks to Jeremy at the Multi Media Corporation.
  5.  
  6. Here are some notes on what you can (and can not) do to items that are part
  7. of a note:
  8.  
  9. 1. Making Layouts Match
  10. -----------------------
  11.  
  12. So, you have a bunch of data in your application layed out in a particular
  13. way and you want to export to the notepad and maintain the same layout.
  14.  
  15. Can you do it... mostly. How to do it is explained below, but there are
  16. some caveats:
  17.  
  18. 1. You can NOT do clipping in any reasonable way
  19.  
  20. 2. You can NOT do viewJustify stuff in any reasonable way
  21.  
  22. 3. You can have only ONE level of children, no grouping
  23.  
  24. 4. Printing or Faxing from the Notepad will do the smart postformatting,
  25.    that means all your formatting will probably be lost.
  26.  
  27.  
  28.  
  29. 2. More on the NotePad Format
  30. -----------------------------
  31.  
  32. The information in NPG on accessing system data is correct, however there
  33. are a couple of ommisions that are important for getting things to
  34. look the same.
  35.  
  36. Paragraph data entries (i.e., viewStationary: 'para) can have other
  37. slots set:
  38.  
  39.     viewFont: the view font that you want to use to display the text
  40.  
  41. This is in addition to the viewBounds, text, tabs and styles slots.
  42.  
  43.  
  44. 3. Getting the Data Right
  45. -------------------------
  46.  
  47. To get the data to look right you need to set ** things:
  48.  
  49.     1. viewBounds - make sure children are normalized to the top parent
  50.     
  51.     2. viewFont - this may be needed to get the correct font
  52.     
  53.     3. styles - if you have style information, you need this array
  54.     
  55.     4. tabs - if you have tabs in the text you need this
  56.     
  57.     5. text - obvious
  58.     
  59. NOTE: you may not need 2, 3 and 4
  60.  
  61.  
  62. 4. Onto the Sample
  63. ------------------
  64.  
  65. First off, thanks to Jeremy at the Multi Media Corporation for the original
  66. question and sample code!
  67.  
  68. There is only one important method in the sample:
  69.  
  70. Notarize.buttonClickScript
  71.  
  72. This is where all the work happens. Take a look at the code, it is liberaly
  73. documented.
  74.